set "CARGO_BIN=%CARGO_HOME%\.cargo\bin"
@REM if not exist "%OSTOOL_EXE%" (
@REM     set "CARGO_BIN=%USERPROFILE%\.cargo\bin"
@REM     echo use default cargo bin
@REM )

set "OSTOOL_EXE=%CARGO_BIN%\ostool.exe"

if exist "%OSTOOL_EXE%" (
    echo ostool installed
) else (
    echo install ostool
    set CURDIR=%cd%
    C:
    cd "%TMP%"
    cargo install ostool
    Z:
    cd "%CURDIR%"
)

ostool run uboot

